//
//  HMPushController.swift
//  HMSlender
//
//  Created by 赵少朋赵少朋 on 17/1/17.
//  Copyright © 2017年 ITheima. All rights reserved.
//

import UIKit

class HMPushController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.white
        setupUI()
        
    }
    
    func setupUI() {
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "PUSH", style: UIBarButtonItemStyle.plain, target: self, action: #selector(pushClick))
    }

    func pushClick() {
        
        navigationController?.pushViewController(HMPushController(), animated: true)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
